package Merlion.util.state;

import Merlion.FRM.entity.InvoiceLineEntryEntity;
import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Temporal;

public class InvoiceAndReceiptState implements Serializable {

    private Long invoiceId;
    private Long salesOrderId;
    private Double cashInAdvance; //always full amount
    private Double discountRate;
    private Double totalPrice;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date issueDate;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date invoiceDueDate;
    private int creditTerm; //in days
    private int discountedCreditTerm; //in days
    private Double amountDue;
    private boolean invoiceStatus; //"not paid-0", "paid-1"
    private String deleteFlag;
    private String paymentMethod;
    private Collection<InvoiceLineEntryEntity> iles;

    public InvoiceAndReceiptState(Long invoiceId, Long salesOrderId, Double cashInAdvance, Double discountRate,
            Double totalPrice, Date issueDate, Date invoiceDueDate, int creditTerm,
            int discountedCreditTerm, Double amountDue, boolean invoiceStatus, String deleteFlag, Collection<InvoiceLineEntryEntity> iles, String paymentMethod) {
        this.setInvoiceId(invoiceId);
        this.setSalesOrderId(salesOrderId);
        this.setCashInAdvance(cashInAdvance);
        this.setDiscountRate(discountRate);
        this.setTotalPrice(totalPrice);
        this.setIssueDate(issueDate);
        this.setInvoiceDueDate(invoiceDueDate);
        this.setCreditTerm(creditTerm);
        this.setDiscountedCreditTerm(discountedCreditTerm);
        this.setAmountDue(amountDue);
        this.setInvoiceStatus(invoiceStatus);
        this.setDeleteFlag(deleteFlag);
        this.setPaymentMethod(paymentMethod);
        this.setIles(iles);
    }

    public InvoiceAndReceiptState() {
    }

    public Double getAmountDue() {
        return amountDue;
    }

    public void setAmountDue(Double amountDue) {
        this.amountDue = amountDue;
    }

    public Double getCashInAdvance() {
        return cashInAdvance;
    }

    public void setCashInAdvance(Double cashInAdvance) {
        this.cashInAdvance = cashInAdvance;
    }

    public int getCreditTerm() {
        return creditTerm;
    }

    public void setCreditTerm(int creditTerm) {
        this.creditTerm = creditTerm;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Double getDiscountRate() {
        return discountRate;
    }

    public void setDiscountRate(Double discountRate) {
        this.discountRate = discountRate;
    }

    public int getDiscountedCreditTerm() {
        return discountedCreditTerm;
    }

    public void setDiscountedCreditTerm(int discountedCreditTerm) {
        this.discountedCreditTerm = discountedCreditTerm;
    }

    public Collection<InvoiceLineEntryEntity> getIles() {
        return iles;
    }

    public void setIles(Collection<InvoiceLineEntryEntity> iles) {
        this.iles = iles;
    }

    public Date getInvoiceDueDate() {
        return invoiceDueDate;
    }

    public void setInvoiceDueDate(Date invoiceDueDate) {
        this.invoiceDueDate = invoiceDueDate;
    }

    public Long getInvoiceId() {
        return invoiceId;
    }

    public void setInvoiceId(Long invoiceId) {
        this.invoiceId = invoiceId;
    }

    public boolean isInvoiceStatus() {
        return invoiceStatus;
    }

    public void setInvoiceStatus(boolean invoiceStatus) {
        this.invoiceStatus = invoiceStatus;
    }

    public Date getIssueDate() {
        return issueDate;
    }

    public void setIssueDate(Date issueDate) {
        this.issueDate = issueDate;
    }

    public Long getSalesOrderId() {
        return salesOrderId;
    }

    public void setSalesOrderId(Long salesOrderId) {
        this.salesOrderId = salesOrderId;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }
    
}
